extern crate usrtrust;

use usrtrust::{ULogs,Environment};
use std::path::{Path};
use std::io::Write;
fn main() -> std::io::Result<()> {
    let e = Environment::from_dir(Path::new("/tmp/usrtos"))?;
    let logt = ULogs::from_env(&e);
    writeln!(*logt.sys(),"{}","This is sys log");
    writeln!(*logt.info(),"{}","This is info log");
    writeln!(*logt.dbg(),"{}","This is debug log");
    writeln!(*logt.warn(),"{}","This is warn log");
    writeln!(*logt.error(),"{}","This is error log");
    writeln!(*logt.fatal(),"{}","This is fatal log");
    logt.flush();
    Ok(())
}
